package TestPaperSystem.controller;


import TestPaperSystem.Dto.PageUtils_VO;
import TestPaperSystem.Dto.Page_Qu;
import TestPaperSystem.Dto.Qu_Vo;
import TestPaperSystem.service.QuService;
import TestPaperSystem.utils.R;
import TestPaperSystem.utils.ResponseUtils_R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xwj
 * @since 2023-03-25
 */
@RestController
@RequestMapping("/qu")
public class QuController {

    @Autowired
    QuService quService;

    @PostMapping("/getQuList")
    public R getQuList(@RequestBody Page_Qu quDTO) throws Exception{
        return ResponseUtils_R.success(quService.getQuList(quDTO));
    }

    @PostMapping("/save")
    public R saveData(@RequestBody Qu_Vo quVo) throws Exception{
        return ResponseUtils_R.success(quService.saveData(quVo));
    }

    @PostMapping("/details")
    public R getDetails(@RequestBody PageUtils_VO quVo) throws Exception{
        return ResponseUtils_R.success(quService.Details(quVo));
    }
}

